<%        
    response.setHeader("Pragma", "No-cache");
    response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
    response.setDateHeader("Expires", -1);
%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<f:loadBundle basename="prueba.principal.resources.CustomMessages" var="msg"/>

<html>
<head>
    <title>Main Menu</title>
    <link rel="stylesheet" type="text/css" href="/AplicacionJSF2_2/css/estilos.css"/>	
</head>
<body>
<f:view locale="#{idioma.local}">
	<h:form>
		<table width="350px;">
			<tr>	
				<td class="celdaTop" style="font-size: 10px;">
					<h:outputLabel value="#{userBean.left}"/>
				</td>
				<td class="celdaTop">
					<h:outputLabel value="#{msg.menu_welcome}"/>:
					<c:out value="${sessionScope.username}"/>
				</td>				
			</tr>
			<tr>
				<td colspan="2" align="right" valign="middle">
					<h:selectOneMenu  value="#{idioma.local}" styleClass="styled-select"  
						valueChangeListener="#{idioma.cambioIdiomaListener}"   onchange="this.form.submit()">
						<f:selectItems value="#{idioma.idiomas}"/>
					</h:selectOneMenu>
					&nbsp;
					
				</td>
			</tr>
			<tr>
				<td><h2 style="text-decoration:underline;"><h:outputText value="Menu"/></h2></td>
				<td></td>
			</tr>
			<tr>
				<td>
					<h:commandLink  value="#{msg.menu_adduser}" action="#{userBean.formularioAddUser }">
						<f:actionListener type="prueba.principal.listeners.ActionListenerImpl"/>
					</h:commandLink>
				</td>
			</tr>
			<tr>
				<td>
					<h:commandLink  value="#{msg.menu_listuser}" action="#{userBean.listUsers }">
						<f:actionListener type="prueba.principal.listeners.ActionListenerImpl"/>
					</h:commandLink>
				</td>
			</tr>
			<tr>
				<td>
					<h:commandLink  value="#{msg.menu_deluser}" action="#{userBean.formulariodelUser }">
						<f:actionListener type="prueba.principal.listeners.ActionListenerImpl"/>
					</h:commandLink>
				</td>
			</tr>	
			<tr>
				<td><br></td>
			</tr>		
			<tr>
				<td><h:commandLink action="#{userBean.logout}" value="Log Out"/></td>
				<td></td>
			</tr>			
		</table>
	</h:form>
</f:view>
</body>
</html>